Skip to content

fix: manage derived state across lifecycle - #642

Merged
ScriptedAlchemy merged 4 commits into
mainfrom
fix/641-derived-state-root
Sep 5, 2026
Merged

fix: manage derived state across lifecycle#642
ScriptedAlchemy merged 4 commits into
mainfrom
fix/641-derived-state-root

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • make uninstall --plan and confirmed --purge-data resolve the installed copy’s runtime state root, including host-declared AGENT_BUNDLE_STATE_ROOT, and preserve it under --keep-data
  • report effective and legacy state roots from doctor, including existence, writability, and AB7332 for retained pre-feat(runtime): separate the framework state root from the plugin code root #640 state
  • cover generated installer and packed state-writing lifecycle behavior; update English/Chinese docs and diagnostics

Validation

  • pnpm build
  • pnpm typecheck
  • pnpm lint
  • pnpm test:unit
  • pnpm test:projection
  • pnpm docs:site:build
  • pnpm exec rstest --config rstest.config.ts packages/agent-bundle/tests/packed-readonly-state-root.test.ts
  • targeted host-install, packed CLI, and installer-entry suites

Deslop

  • GPT-5.6 Sol, 1 edit: removed the superseded retainedPluginData field and reused the external-state path decision for remnant receipts.

Self-review

  • Reviewer: Claude Fable 5.1 Thinking High
  • Initial findings: manifest-declared state roots were not retained through a Cursor keep→purge cycle; web-data derivation diverged under symlinked roots; Codex keep-data reporting included in-tree state removed by the host; AB7316/Codex docs were stale.
  • Disposition: fixed all findings with remnant receipt state-root metadata, a shared web-data-root helper plus symlink regression, corrected Codex path/outcome logic, and docs/capability/changeset updates. CI then exposed an eager optional-runtime import; the final implementation keeps lifecycle code runtime-free while runtime-backed tests pin identical root derivation.
  • Final re-review at 55d19903d: no concrete merge risks remain.

Closes #641

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@changeset-bot

changeset-bot Bot commented Sep 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 55d1990

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-bundle Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 5, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@642
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@642
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/rsc-markdown-stream@642
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@642

commit: 55d1990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uninstall --purge-data and doctor do not address the derived framework state root (~/.agent-bundle/state) or web-data (follow-up to #637, #628)

1 participant